package unit11;

import java.net.*;
import java.io.*;
public class Ex11_1_SocketTest {
    public static void main(String[] args) {
        try {
            Socket s = new Socket("time-A.timefreq.bldrdoc.gov", 13);
            BufferedReader in = new BufferedReader(new
                                                   InputStreamReader(s.getInputStream()));
            String line = "";
            while ((line = in.readLine()) != null)
                System.out.println(line);
            in.close();
            s.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
